home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_bas
/
mices
/
popmouse.bas
< prev
next >
Wrap
BASIC Source File
|
1988-04-16
|
2KB
|
66 lines
DECLARE SUB POPMOUSE(HEADER$,CHOICES%,SET%,ITEMS$(2),FRAME%,FORE%,BACK%,HFORE%,HBACK%,QUADRANT$,SHADOW%,CHOICE%)
DEFINT A-Z: KEY OFF: COLOR 7,0: CLS
DIM ITEMS$(5,6),PROMPTS$(6)
DIM MAXITEMS(5)
LOCATE 8,10: PRINT "This is POPMOUSE - A routine used to select options from"
LOCATE 9,10: PRINT "several menu windows using the cursor keys or the mouse to"
LOCATE 10,10: PRINT "move a 'select bar'. Selection is made by the Enter key"
LOCATE 11,10: PRINT "or the left mouse button."
FOR S = 1 TO 10
CALL DELAY(1): A$=INKEY$: IF LEN(A$) <> 0 THEN S=10
NEXT S
ITEMS$(0,1)=" Demo Lists ": MAXITEMS(0)=6: PROMPTS$(0)="Select Demo ..."
ITEMS$(0,2)=" Demo Directories "
ITEMS$(0,3)=" Demo Menus "
ITEMS$(0,4)=" Demo Calendars "
ITEMS$(0,5)=" Demo Warnings "
ITEMS$(0,6)=" End Demo "
ITEMS$(1,1)=" POPLIST ": MAXITEMS(1)=2: PROMPTS$(1)="Select List ..."
ITEMS$(1,2)=" TAGLIST "
ITEMS$(2,1)=" POPDIR ": MAXITEMS(2)=2: PROMPTS$(2)="Select Directory ..."
ITEMS$(2,2)=" TAGDIR "
ITEMS$(3,1)=" BARMENU ": MAXITEMS(3)=2: PROMPTS$(3)="Select Memo ..."
ITEMS$(3,2)=" MENU123 "
ITEMS$(4,1)=" CALENDAR ": MAXITEMS(4)=3: PROMPTS$(4)="Select Calendar..."
ITEMS$(4,2)=" CALENDR3 "
ITEMS$(4,3)=" KEYCAL "
ITEMS$(5,1)=" CAUTION ": MAXITEMS(5)=2: PROMPTS$(5)="Select Flag ..."
ITEMS$(5,2)=" WARNING "
Demo:
SET=0
POPMOUSE PROMPTS$(SET),MAXITEMS(SET),SET,ITEMS$(),4,0,7,15,1,"0",1,CHOICE
IF CHOICE=0 OR CHOICE=6 GOTO Endit
SET=CHOICE: GOSUB Dochoice
GOTO Demo
Dochoice:
POPMOUSE PROMPTS$(SET),MAXITEMS(SET),SET,ITEMS$(),4,0,7,15,1,"0",1,CHOICE
LOCATE 21,10
PRINT "For set:";SET;";"
LOCATE 22,10
PRINT "The Item Number you selected was";CHOICE;ITEMS$(SET,CHOICE)
IF CHOICE=0 OR CHOICE=6 GOTO Clrmsg
LOCATE 23,10
PRINT "To end demo, press ESC key or right mouse button"
SECONDS=5: CALL DELAY(SECONDS)
Clrmsg:
LOCATE 21,10: CALL CLREOL
LOCATE 22,10: CALL CLREOL
LOCATE 23,10: CALL CLREOL
RETURN
Endit:
SECONDS=5: CALL DELAY(SECONDS)
END